{% extends "jinhtml/skel.html" %}
{% block headcss %}
	<link rel = "stylesheet" type = "text/css" href = "/css/list.css">
{% endblock %}

{% block onload %}
	setinitialform ();
	setyear ();
	setinitialcss ();
	var switchlistobj = document.getElementById("switchlist")
	switchlistobj.className += "selected";
	switchlistobj.onclick = "";
{% endblock %}

{% block headjs %}
	<script src = "/js/data.js" type = "text/javascript"></script>
	<script src = "/js/list.js" type = "text/javascript"></script>
	<!-- <script src = "> -->
{% endblock %}

{% block body %}
	<div id = "timebar" align = "center">
		<input type = "button" value = "<" onclick = "changeyear (-1);"></input>
		<span id = "year"> XXXX </span>
		年
		<input type = "button" value = ">" onclick = "changeyear (1);"></input>
	</div>
	<div id = "searchbar" align = "center">
		搜尋選項：
		<select id = "searchingoption" onchange = "changesearchingbar (); clearformerinput ();">
			<option value = "date"> 日期 </option>
			<option value = "title" selected = "selected"> 標題 </option>
			<option value = "content"> 內容 </option>
		</select>
		<input id = "searchinginput" type = "text" onkeydown = "checkifsearchevent (event);" />
		<div id = "searchingdate" style = "display:none;">
			<input id = "searchingdatemonth" type = "text" size = "2" maxlength = "2" onkeydown = "checkifsearchevent (event);" /> 月
			<input id = "searchingdateday" type = "text" size = "2" maxlength = "2" onkeydown = "checkifsearchevent (event);" /> 日
		</div>
		<input type = "button" value = "搜尋" style = "font-size:1em;" onclick = "searchevent ();" />
		<input id = "prevsearchbutton" type = "button" value = "返回" onclick = "backtoprevsearch ();" />
		<input id = "nosearchbutton" type = "button" value = "取消" onclick = "backtoprevsearch ('nosearch');" />
	</div>
	<div id = "neweventblock" align = "center">
		<input id = "neweventbutton" type = "button" value = "新增活動" onclick = "displayneweventinput ();" />
	</div>
	<div id = "neweventinputblock" align = "center">
		<table id = "neweventtable" cellpadding = "0" cellspacing = "0" style = "width:100%;">
			<tr id = "neweventhead">
				<td id = "neweventdate" class = "date"></td>
				<td id = "neweventweek" class = "week"></td>
				<td id = "neweventtime" class = "time"></td>
				<td id = "neweventtitle" class = "title"></td>
			</tr>
			<tr id = "neweventbody">
				<td id = "neweventcontent" class = "content" colspan = "4"></td>
			</tr>
		</table>
	</div>
	<div align = "center">
		<table id = "listcal" cellpadding = "0" cellspacing = "0" style = "width:100%;">
			<thead>
				<tr>
					<td colspan = "3" id = "date"> 日期 </td>
					<td id = "eventcontent"> 標題 </td>
					<td> 操作 </td>
				</tr>
			</thead>
			<tbody id = "eventbody">
			</tbody>
		</table>
	</div>
	<div id = "unmatchedmessage">
		找不到活動
	</div>
	<div id = "noeventmessage">
		沒有任何活動
	</div>
	<div id = "changepagebutton" align = "center">
		<input id = "prevpagebutton" type = "button" value = "上10筆" onclick = "gopage (-1);" />
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input id = "nextpagebutton" type = "button" value = "下10筆" onclick = "gopage (1);" />
	</div>
{% endblock %}
